
.PHONY:	hello_loongson_pi_c

hello_loongson_pi_c:	hello_loongson_pi.c
	gcc -o hello_loongson_pi_c_x86_64 hello_loongson_pi.c -lpthread
	mips64el-linux-gcc -o hello_loongson_pi_c_loongson hello_loongson_pi.c -lpthread
	cargo build --release
	cargo build --release --target=mips64el-unknown-linux-gnuabi64
	pip3 install -r requirements.txt
	cp target/release/hello-loongsonpi-serial ./hello_loongson_pi_rust_x86_64
	cp target/mips64el-unknown-linux-gnuabi64/release/hello-loongsonpi-serial ./hello_loongson_pi_rust_loongson

clean:
	rm -f hello_loongson_pi_c
	rm -f hello_loongson_pi_rust_loongson
	rm -f hello_loongson_pi_rust_x86_64
	rm -f hello_loongson_pi_c_loongson
	rm -f hello_loongson_pi_c_x86_64
	cargo clean
